Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created toBeWithinPercent and toContainKeysWithinPercent #301

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

scottdykes1611
Copy link

@scottdykes1611 scottdykes1611 commented Nov 11, 2020

What

Created a toBeWithinPercent function to check if a number is within x percent of a target number, and toContainKeysWithinPercent function to check if an object contains keys and if the keys' values are within x percent of a target number.

Why

To be used similarly to the toBeWithin function, but sometimes a percentage is needed rather than a range.

The toContainKeysWithinPercent function is for a similar purpose but for use within an object.

Notes

Housekeeping

  • Unit tests
  • Documentation is up to date
  • No additional lint warnings
  • Typescript definitions are added/updated where relevant

@scottdykes1611 scottdykes1611 changed the title Created toBeWithinPercent Created toBeWithinPercent and toContainKeysWithinPercent Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant